home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
sigwait.z
/
sigwait
Wrap
Text File
|
1998-10-20
|
7KB
|
133 lines
SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333)))) SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333))))
NNNNAAAAMMMMEEEE
sigwait, sigwaitinfo, sigtimedwait - wait for queued signals (POSIX)
CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ssssiiiiggggnnnnaaaallll....hhhh>>>>
####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttiiiimmmmeeeerrrrssss....hhhh>>>>
iiiinnnntttt ssssiiiiggggwwwwaaaaiiiitttt((((ccccoooonnnnsssstttt ssssiiiiggggsssseeeetttt____tttt ****sssseeeetttt,,,, iiiinnnntttt ****ssssiiiigggg))));;;;
iiiinnnntttt ssssiiiiggggwwwwaaaaiiiittttiiiinnnnffffoooo((((ccccoooonnnnsssstttt ssssiiiiggggsssseeeetttt____tttt ****sssseeeetttt,,,, ssssiiiiggggiiiinnnnffffoooo____tttt ****vvvvaaaalllluuuueeee))));;;;
iiiinnnntttt ssssiiiiggggttttiiiimmmmeeeeddddwwwwaaaaiiiitttt((((ccccoooonnnnsssstttt ssssiiiiggggsssseeeetttt____tttt ****sssseeeetttt,,,, ssssiiiiggggiiiinnnnffffoooo____tttt ****vvvvaaaalllluuuueeee,,,, ttttiiiimmmmeeeessssppppeeeecccc____tttt ****ttttiiiimmmmeeeeoooouuuutttt))));;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _s_i_g_w_a_i_t() function selects a pending signal from _s_e_t and returns it
in the storage pointed to by _s_i_g. If multiple signals from _s_e_t are
pending, then the one with the lowest numerical value is selected. If no
signals in _s_e_t are pending then the call will block until one becomes
pending, The signals defined by _s_e_t must be blocked at the time of the
call to _s_i_g_w_a_i_t() in order to avoid conflicts with installed signal
handlers. If the signals in _s_e_t are not blocked then the system will
either deliver the signal asynchronously, or _s_i_g_w_a_i_t() will return with
the signal. Users are advised to always block signals in _s_e_t to get
predictable results.
The _s_i_g_w_a_i_t_i_n_f_o() call behaves the same as the _s_i_g_w_a_i_t() call if the
_v_a_l_u_e argument is NULL. If the _v_a_l_u_e argument is non-NULL, the
sigwaitinfo() function behaves the same as _s_i_g_w_a_i_t() except the selected
signal number is stored in the _s_i__s_i_g_n_o member, and the cause of the
signal is stored in the _s_i__c_o_d_e member. If any value was queued to the
selected signal, the first such queued value is dequeued and the value is
stored in the _s_i__v_a_l_u_e member of _v_a_l_u_e. The system resource used to queue
the signal shall be released and made available to queue other signals.
If no value is queued, the content of the _s_i__v_a_l_u_e member is undefined.
If no further signals are queued for the selected signal, the pending
indication for that signal shall be reset.
The function _s_i_g_t_i_m_e_d_w_a_i_t() behaves the same as _s_i_g_w_a_i_t_i_n_f_o() except that
if none of the signals specified by _s_e_t are pending, _s_i_g_t_i_m_e_d_w_a_i_t() shall
wait for the time interval specified in the _t_i_m_e_s_p_e_c structure pointed to
by _t_i_m_e_o_u_t. If the _t_i_m_e_s_p_e_c structure pointed to by _t_i_m_e_o_u_t is zero-
valued and if none of the signals specified by _s_e_t are pending, then
_s_i_g_t_i_m_e_d_w_a_i_t() shall return immediately with an error. If _t_i_m_e_o_u_t is the
NULL pointer, the behavior is the same as _s_i_g_w_a_i_t_i_n_f_o()
If any realtime signals (those in the range SSSSIIIIGGGGRRRRTTTTMMMMIIIINNNN to SSSSIIIIGGGGRRRRTTTTMMMMAAAAXXXX) are
pending, the lowest numbered signal shall be returned. The order in
which realtime and nonrealtime signals are returned is nondeterministic.
The order in which multiple nonrealtime signals are returned is also
nondeterministic.
PPPPaaaaggggeeee 1111
SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333)))) SSSSIIIIGGGGWWWWAAAAIIIITTTT((((3333))))
SEE ALSO
_kkkk_iiii_llll_llll(2), _ssss_iiii_gggg_aaaa_cccc_tttt_iiii_oooo_nnnn(2), _ssss_iiii_gggg_qqqq_uuuu_eeee_uuuu_eeee(3), _ssss_iiii_gggg_nnnn_aaaa_llll(5), _pppp_tttt_hhhh_rrrr_eeee_aaaa_dddd______ssss_iiii_gggg_mmmm_aaaa_ssss_kkkk(3P).
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Upon successful completion, _s_i_g_w_a_i_t() returns a 0. Otherwise, it returns
an error number to indicate the error.
Upon successful completion, _s_i_g_w_a_i_t_i_n_f_o() and _s_i_g_t_i_m_e_d_w_a_i_t() return the
selected signal number. Otherwise, they return a -1 and set _e_r_r_n_o to
indicate the error number.
If any of the conditions below occur, the error number will take on the
corresponding value:
[EINTR] The wait was interrupted by an unblocked, caught signal.
If any of the following conditions occur, the _s_i_g_w_a_i_t() function shall
return the corresponding value:
[EINVAL] The _s_e_t argument contains an invalid or unsupported signal
number.
If any of the following conditions occur, the _s_i_g_t_i_m_e_d_w_a_i_t() function
shall return -1 and set _e_r_r_n_o to the corresponding value:
[EAGAIN] No signal specified by set was delivered within the
specified timeout period.
[EINVAL] The _t_i_m_e_o_u_t argument specified a _t_v__n_s_e_c value less than
zero or greater than or equal to 1 billion.
WWWWAAAARRRRNNNNIIIINNNNGGGG
The POSIX and System V signal facilities have different semantics. Using
both facilities in the same program is ssssttttrrrroooonnnnggggllllyyyy ddddiiiissssccccoooouuuurrrraaaaggggeeeedddd and will
result in unpredictable behavior.
PPPPaaaaggggeeee 2222